package com.xiaoyu.base.model;

import java.util.List;
import java.util.Objects;

public class AreaBaseModel {

    private String name;
    private List<AreaBaseModel> childList;

    public AreaBaseModel(String name, List<AreaBaseModel> childList) {
        this.name = name;
        this.childList = childList;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<AreaBaseModel> getChildList() {
        return childList;
    }

    public void setChildList(List<AreaBaseModel> childList) {
        this.childList = childList;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        AreaBaseModel other = (AreaBaseModel) o;
        return name.equals(other.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name);
    }

    @Override
    public String toString() {
        return "AreaBaseModel{" +
                "name='" + name + '\'' +
                ", childList=" + childList +
                '}';
    }
}
